// ml:run = $bin > input
#include <iostream>
#include <ctime>
#include <cstdlib>

int main()
{
	std::srand(std::time(0));
	int n = 19227, m = 911965;
	std::cout << n << ' ' << m << "\n";
	for (int i = 0 ; i < n; i++)
		std::cout << rand() % 60 + 1 << " ";
    std::cout << "\n";
    for (int i = 0; i < m; i++) std::cout << rand() % n + 1 << "\n";
}

